package cn.zhouchao.system.service.impl;

import cn.zhouchao.basic.service.impl.BaseServiceImpl;
import cn.zhouchao.system.domain.Systemdictionarytype;
import cn.zhouchao.system.mapper.SystemdictionarydetailMapper;
import cn.zhouchao.system.mapper.SystemdictionarytypeMapper;
import cn.zhouchao.system.service.ISystemdictionarytypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SystemdictionaryTypeServiceImpl extends BaseServiceImpl<Systemdictionarytype> implements ISystemdictionarytypeService {
    @Autowired
    private SystemdictionarytypeMapper systemdictionarytypeMapper;

    @Autowired
    private SystemdictionarydetailMapper systemdictionarydetailMapper;

    @Override
    public void deletes(Long id) {
        systemdictionarydetailMapper.deleteDetailByTypeId(id);
        systemdictionarytypeMapper.delete(id);

    }

    @Override
    public void batchDelete(List<Long> ids) {
        systemdictionarydetailMapper.batchDeletes(ids);
        systemdictionarytypeMapper.batchDelete(ids);
    }
}
